//package com.song.seckill.producer;
//
//import com.rabbitmq.client.Channel;
//import com.rabbitmq.client.Connection;
//import com.rabbitmq.client.ConnectionFactory;
//
//public class SeckillProducer {
//    public void sendSeckillMessage(String skuId, String userId) {
//        ConnectionFactory factory = new ConnectionFactory();
//        factory.setHost("localhost");
//        try (Connection connection = factory.newConnection();
//             Channel channel = connection.createChannel()) {
//            channel.queueDeclare("seckill_queue", false, false, false, null);
//            String message = skuId + ":" + userId;
//            channel.basicPublish("", "seckill_queue", null, message.getBytes());
//        }
//    }
//}
